package edu.mis.modules.category;

import java.util.List;

import edu.mis.model.*;

public class CategoryService {

	private static final Category dao=new Category().dao();
	
	public boolean save(Category category) {
		return category.save();
	}
	
	public boolean update(Category category) {
		return category.update();
	}
	
	public boolean delete(Category category) {
		return category.delete();
	}
	
	public List<Category> findAllCategory(){
		return dao.find("select * from category");
	}
	
	public Category findCategoryById(int id) {
		return dao.findById(id);
	}
	
	public boolean deleteCategoryById(int id) {
		return dao.deleteById(id);
	}
}